%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%This is part of the set of files that accompany the article:       %
%Mankiw, N. Gregory and Ricardo Reis (2007) "Sticky Information in  %
%General Equilibrium," Journal of the European Economic Association,%
%forthcoming. See the appendix of the NBER or CEPR working paper    %
%versions for a detailed explanation of the algorithms.             %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Please cite if you use the programs. I do not provide tech support.%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Last revised: August 30, 2006                                      %
%Written by: Ricardo Reis                                           %
%Input: the MLE parameters in MLEresults.mat and MLEvd.mat          %
%Output: Displays the MLE sections of Tables 1 and 2.               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

clear; clc

disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');
disp('     RESULTS ON ESTIMATING PERVASIVE STICKINESS     ');
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');
disp(' ')

disp('##########################################')
disp('########       MLE RESULTS        ########')
disp('##########################################')
disp(' ')
load MLEresults.mat
disp('MLE parameters:  ')
disp('    nu   gamma   rho_g     sigma_g   rho_nu    sigma_nu  rho_gam   sigma_gam delta     omega     lambda'); disp(MLE)
disp('Standard errors:  '); disp(SE')
disp('Log-likelihood value:'); disp(fval)
%disp('Variance-covariance matrix:'); disp(VARCOV)
disp(' ')
CI95=[];
for i=1:11
    CI95(1,i)=norminv(.025,MLE(i),SE(i));
    CI95(2,i)=norminv(.975,MLE(i),SE(i));
end
clear i; disp('95% confidence set:'); disp(CI95)

load MLEvd.mat
disp('##### MLE variance decomposition ##### '); disp('Columns are shocks: m a g nu gamma');
disp('Rows are variables: inflation output growth, nominal interest rate, real wage growth, and hours');
disp(' ')
disp('MLE estimates'); disp(VD_mle)
disp('median estimates'); disp(VD_500)
disp('2.5% estimates'); disp(VD_025)
disp('97.5% estimates'); disp(VD_975)

disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');
disp('                 THE END                            ');
disp('%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%');

